﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" Culture="th-TH" uiCulture="th" AutoEventWireup="true" CodeBehind="MP_MasFieldPositionGroups.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.MP_MasFieldPositionGroups" %>
<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc1" %>
<asp:Content 
    ID="Content1" 
    runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
    
    <title>กำหนดกลุ่มอาชีพ</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
    
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">        
            <script type="text/javascript">
                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
                                
            </script>       
    </telerik:RadCodeBlock>
    
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cmdSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdExpand">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1"
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdCollapse">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblUpperText" />
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
        Height="100%" Width="75px" Transparency="50">
        <table style="height: 100%; width: 100%" border="0">
            <tr>
                <td width="100%" align="center" valign="middle">
                    <img alt="Loading..." 
                        src="../Images/Buttons/loading.gif" 
                        style="border: 0px;" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
        <tr valign="top">
        
            <td valign="top" align="left">
            </td>
             <td width="20" >
                 
            </td>
            
            <td>
            <div class="moduleDivSlim700">
                    <div class="moduleDivBottom700">
                         <asp:Panel ID="PanelFilter" runat="server" Width="700px" ScrollBars="Auto">
                            <table align = "center" width = "650px">
                                    <tr>
                                        <td align="right" >
                                            ประเภทบุคลากร :</td>
                                        <td align="left">
                                        <telerik:RadComboBox ID="ddlEmployeeType" runat="server" AllowCustomText="true" 
                                            AutoPostBack="true" CausesValidation="false" DataTextField="Name" 
                                            DataValueField="Sequence" EmptyMessage="... เลือกประเภทบุคลากร ..." 
                                            Filter="Contains" OnClientTextChange="onTextChange" 
                                            onselectedindexchanged="ddlEmployeeType_SelectedIndexChanged" Width="200px">
                                        </telerik:RadComboBox>
                                         <asp:RequiredFieldValidator ID="v7" runat="server" 
                                                ControlToValidate="ddlEmployeeType" ErrorMessage="*"></asp:RequiredFieldValidator>
                                        </td>
                                        </td>
                                        
                                       <td align="right">
                                       </td>
                                       <td align="left">
                                        
                                        </td>
                                    </tr>
                                </table>
                        </asp:Panel>
                    </div>
                </div>
            </td>
          </tr>
          <tr>
          <td colspan = "3">
        <div class="moduleDivSlim1000x450">
        <div class="moduleDivBottom1000">
        <table align="center" width ="980px" >
        <tr>
            <td align="left" class="tableHeader">
                กำหนดกลุ่มอาชีพ
            </td>
        </tr>
        </table>
        <table width ="980px" align = "center" >
        <tr>
            <td >
                <asp:Panel ID="PanelGrid" runat="server" Height="400px" ScrollBars="Auto" 
                    Width="980px">
                    <telerik:RadGrid 
                            ID="RadGrid1" 
                            runat="server" 
                            AllowAutomaticDeletes="True" 
                            AllowFilteringByColumn="True" 
                            AllowMultiRowEdit="True" 
                            AllowMultiRowSelection="True" 
                            AllowPaging="True" 
                            AllowSorting="True" 
                            AutoGenerateColumns="False" 
                            EnableAJAX="True" 
                            EnableAJAXLoadingTemplate="True" 
                            GridLines="None" 
                            OnItemCommand="RadGrid1_ItemCommand" 
                            Skin="Outlook" 
                            Width="950px">
                            <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                                ClientDataKeyNames="Sequence" 
                                CommandItemDisplay="Top" 
                                DataKeyNames="Sequence" 
                                InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                                NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                <CommandItemTemplate>
                                    <table width="100%">
                                        <tr>
                                            <td>
                                                <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                                    CommandName="InitInsert" 
                                                    
                                                    
                                                    Visible="<%# !RadGrid1.MasterTableView.IsItemInserted && RadGrid1.EditIndexes.Count <= 0 %>">
                                        <img style="border:0px;vertical-align:middle;" alt="" 
                                        src="../Images/Buttons/AddRecord.gif" /> เพิ่มข้อมูลใหม่</asp:LinkButton>
                                                &nbsp;&nbsp;
                                            </td>
                                            <td align="right">
                                                
                                            </td>
                                        </tr>
                                    </table>
                                </CommandItemTemplate>
                                <RowIndicatorColumn>
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn>
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                                
                                <Columns>
                                    <telerik:GridEditCommandColumn 
                                        ButtonType="ImageButton" 
                                        EditText="คลิกเพื่อแก้ไขข้อมูล"                                        
                                        ItemStyle-Width="15">
                                        <ItemStyle Width="15px" />
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridButtonColumn 
                                        ButtonType="ImageButton" 
                                        CommandName="Delete" 
                                        ConfirmDialogType="RadWindow" 
                                        ConfirmText="ลบข้อมูลที่เลือก?" 
                                        ItemStyle-Width="15" 
                                        Text="คลิกเพื่อลบรายการ" 
                                        UniqueName="column1">
                                        <ItemStyle Width="15px" />
                                    </telerik:GridButtonColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="Sequence" 
                                        DataType="System.Int32" 
                                        Display="False" 
                                        HeaderText="Sequence" 
                                        ReadOnly="True" 
                                        UniqueName="Sequence" 
                                        Visible="False">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="Name" 
                                        HeaderStyle-HorizontalAlign="Center" 
                                        FilterControlWidth ="100%"
                                        ShowFilterIcon ="false" 
                                        CurrentFilterFunction = "Contains"
                                        AutoPostBackOnFilter="true"
                                        HeaderText="ชื่อกลุ่มอาชีพ" 
                                        UniqueName="Name">
                                        <HeaderStyle HorizontalAlign="Center" Width="200px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="Description" 
                                        HeaderStyle-HorizontalAlign="Center" 
                                        FilterControlWidth ="100%"
                                        ShowFilterIcon ="false" 
                                        CurrentFilterFunction = "Contains"
                                        AutoPostBackOnFilter="true"                                       
                                        HeaderText="คำอธิบาย" 
                                        UniqueName="Description">
                                        <HeaderStyle HorizontalAlign="Center" Width="500px" />
                                    </telerik:GridBoundColumn>
                                </Columns>
                                <EditFormSettings 
                                    EditFormType="WebUserControl" 
                                    UserControlName="../UserControls/MP_MasFieldPositionGroups.ascx">
                                    <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                                </EditFormSettings>
                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                            </MasterTableView>
                            <ClientSettings AllowColumnHide="True" 
                                AllowColumnsReorder="True" 
                                EnableRowHoverStyle="True" 
                                ReorderColumnsOnClient="True">
                                <Selecting AllowRowSelect="True" 
                                EnableDragToSelectRows="true" />
                                </ClientSettings>
                        </telerik:RadGrid>
      
                </asp:Panel>
            </td>
            </tr>
                </table>
                </div>
</div>
</td>
</tr>
</table>
</asp:panel>

</asp:Content>
